using System;
using System.Collections.Generic;
using System.Text;
using Objects;
using DAL;

namespace BAL
{
    public class BALChiNhanh
    {
        BALChiNhanh _dal;
        public BALChiNhanh()
        {
            _dal = new BALChiNhanh();
        }

        public static int Insert_ChiNhanh(string tenchinhanh, string Diachi, String SoDienThoai, int IdTinhThanh, int SapXep)
        {
           DALChiNhanh _dal = new DALChiNhanh();
           return _dal.Insert_ChiNhanh(tenchinhanh, Diachi, SoDienThoai, IdTinhThanh, SapXep);
        }

        public static int Update_ChiNhanh(int idchinhanh, string tenchinhanh, string Diachi, String SoDienThoai, int IdTinhThanh, int Status, int SapXep)
        {
            DALChiNhanh _dal = new DALChiNhanh();
            return _dal.Update_ChiNhanh(idchinhanh, tenchinhanh, Diachi, SoDienThoai, IdTinhThanh, Status, SapXep);
        }

        public static int Delete_ChiNhanh(int idchinhanh)
        {
            DALChiNhanh _dal = new DALChiNhanh();
            return _dal.Delete_ChiNhanh(idchinhanh);
        }


        public static List<ChiNhanh> GetAllItem()
        {
            DALChiNhanh _dal = new DALChiNhanh();
            return _dal.GetAllItem();
        }


        public static List<ChiNhanh> GetByIdTinhThanh(int IdTinhThanh)
        {
            DALChiNhanh _dal = new DALChiNhanh();
            return _dal.GetByIdTinhThanh(IdTinhThanh);
        }

        public static List<ChiNhanh> GetByTenChiNhanh(String ten)
        {
            DALChiNhanh _dal = new DALChiNhanh();
            return _dal.GetByTenChiNhanh(ten);
        }

        public static ChiNhanh GetById(int Id)
        {
            DALChiNhanh _dal = new DALChiNhanh();
            return _dal.GetById(Id);
        }
            
    }
}
